<?php
# User session management
require_once('includes/user_manage.php');

if (!$user->id) {
	include($server->get_path_name('login.php'));
}
elseif ($user->cfm_key) {
?>
<p>Se requiere la clave de confirmación de cuenta.</p>
<p>Por favor introduce la clave que has recibido en tu email.</p>
<?php
	if (MODE == "test") {
?>
	<p>	Clave: <?php echo $user->cfm_key; ?></p>
<?php
	}
?>
<?php
	include($server->get_path_name("cfmkey_form.php"));
}
else {
?>
<ul id="navlist">
	<li>
		<a myFor="rightContentBox:ajaxcontentarea" href="?section=notifications" class="selected">Notificaciones</a>
	</li>
	<li>
		<a target="_self" myFor="rightContentBox:ajaxcontentarea" href="?section=message">Dejar Mensaje</a>
	</li>
  </ul>
<div id="ajaxcontentarea">
<?php
	if (isset($_SERVER['HTTP_USER_AGENT']) && $server->bot_detect($_SERVER['HTTP_USER_AGENT'])) {
		include($server->get_path_name('notifications.php'));
	}
?>
</div>
<script type="text/javascript">
	setViewTo('?section=notifications','rightContentBox:ajaxcontentarea');
</script>
<?php
}
?>
